package com.goldenautumn.prefabricate.business.user

import com.github.gzuliyujiang.wheelpicker.entity.ProvinceEntity
import com.goldenautumn.prefabricate.business.entity.AddressInfoVo
import com.goldenautumn.prefabricate.business.entity.LanguageInfoVo
import com.goldenautumn.prefabricate.business.entity.PaymentMethodVo
import qncx.external.common.room.table.UserInfo


sealed class LoginUiState {

    data class LoginSuccess(val userInfo: UserInfo) : LoginUiState()

    data class LoginFail(val msg: String? = null) : LoginUiState()

    data class CodeResult(val msg: String? = null) : LoginUiState()

}

sealed class UserInfoUiState {

    data class UserInfo(val userInfo: qncx.external.common.room.table.UserInfo) : UserInfoUiState()

    data class OrderCount(val count: com.goldenautumn.prefabricate.business.entity.OrderCount) : UserInfoUiState()

    data class UserMenu(val menus: MutableList<com.goldenautumn.prefabricate.business.entity.UserMenuVo>) : UserInfoUiState()


    data class UserUpdate(var isSuccess: Boolean,val msg: String? = null) : UserInfoUiState()

    data class LanguageList(var language: List<LanguageInfoVo>) : UserInfoUiState()

}

sealed class UserAddressUiState {

    data class AddressTree(val tree: MutableList<ProvinceEntity>) : UserAddressUiState()

    data class AddressList(val addressList: List<AddressInfoVo>) : UserAddressUiState()

    data class AddressAction(val isSuccess:Boolean,val msg:String? = null) : UserAddressUiState()

    data class AddressDetails(val details:AddressInfoVo? = null) : UserAddressUiState()

    data class PaymentType(val payment:ArrayList<PaymentMethodVo>) : UserAddressUiState()

}